package com.holyant.goods.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Objects;

/**
 * @author zgx *
 * @date 2022年06月27日 11:25
 */
@Data
public class GdsGoodsGuidePriceDetailDto {

    @ApiModelProperty(value = "指引价编码:ZYTJ+6位年月日+0001")
    private String code;
    @ApiModelProperty(value = "渠道类型10 c2p 20 pop 30 b2b(hk) 40b2b(mo) 50ka 60 wm")
    private Integer channelType;
    @ApiModelProperty(value = "生效时间")
    private LocalDate effectiveDate;
    @ApiModelProperty(value = "失效时间")
    private LocalDate failureDate;
    @ApiModelProperty(value = "申请原因")
    private String reason;
    /** 品牌id */
    @ApiModelProperty(value = "品牌id")
    private Long brandId;
    /** 品牌 */
    @ApiModelProperty(value = "品牌")
    private String brandName;
    /** skuid */
    @ApiModelProperty(value = "skuid")
    private Long skuId;
    /** sku编码 */
    @ApiModelProperty(value = "sku编码")
    private String skuCode;
    /** sku名称 */
    @ApiModelProperty(value = "sku名称")
    private String skuName;
    /** 商品id */
    @ApiModelProperty(value = "商品id")
    private Long goodsId;
    /** 商品名称 */
    @ApiModelProperty(value = "商品名称")
    private String goodsName;
    /** 商品条码 */
    @ApiModelProperty(value = "商品条码")
    private String goodsBarcode;
    /** 商品编码 */
    @ApiModelProperty(value = "商品编码")
    private String goodsCode;
    /** 效期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "效期")
    private LocalDate expireDate;
    /** 价格json */
    @ApiModelProperty(value = "价格json")
    private String priceObj;
    /** 报价方式 10：包邮不包税，20：包邮包税，30: 不包邮不包税 */
    @ApiModelProperty(value = "报价方式 10：包邮不包税，20：包邮包税，30: 不包邮不包税")
    private Integer quoteMethod;
    /** 币种 */
    @ApiModelProperty(value = "币种")
    private Integer curType;
    /** 分类id */
    @ApiModelProperty(value = "分类id")
    private Long categoryId;
    /**  分类编码 */
    @ApiModelProperty(value = " 分类编码")
    private String categoryCode;
    /** 分类名称 */
    @ApiModelProperty(value = "分类名称")
    private String categoryName;
    /** 计量单位id */
    @ApiModelProperty(value = "计量单位id")
    private Long unitId;
    /** 计量单位名称 */
    @ApiModelProperty(value = "计量单位名称")
    private String unitName;
    /** 毛重 */
    @ApiModelProperty(value = "毛重")
    private BigDecimal grossWeigtht;
    /** 净重 */
    @ApiModelProperty(value = "净重")
    private BigDecimal netWeigtht;
    /** 体积 */
    @ApiModelProperty(value = "体积")
    private BigDecimal volume;
    /** 规格 */
    @ApiModelProperty(value = "规格")
    private String specs;
    /** 箱规 */
    @ApiModelProperty(value = "箱规")
    private String boxSpec;
    /** 托规 */
    @ApiModelProperty(value = "托规")
    private String palletSpec;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        GdsGoodsGuidePriceDetailDto that = (GdsGoodsGuidePriceDetailDto) o;
        return Objects.equals(channelType, that.channelType) && Objects.equals(skuId, that.skuId) && Objects.equals(quoteMethod, that.quoteMethod) && Objects.equals(curType, that.curType);
    }

    @Override
    public int hashCode() {
        return Objects.hash(channelType, skuId, quoteMethod, curType);
    }
}
